<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<spring:message code="project.application.name" var="tooltipMsg" />
<spring:message code="login.username" var="loginUserName" />
<spring:message code="login.password" var="loginPassword" />
<c:set var="CONTEXT">${pageContext.request.contextPath}</c:set>
<c:set var="images">${pageContext.request.contextPath}/resources/images</c:set>
<form:form class="form-horizontal" role="form" action="./joinStep2" method="post"  modelAttribute="termsFormModel">
	<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
	<div class="panel panel-primary terms1" id="terms1">
		<div class="panel-heading"><spring:message code="member.join.terms1.title" /></div>
		<div class="panel-body registeTerms"><spring:message code="member.join.terms1.content" /></div>
		<div class="panel-footer">
			<label><form:checkbox path="terms1"/>&nbsp;<spring:message code="member.join.terms.agree"/></label>
		</div>
	</div>
	<div class="panel panel-primary terms2" id="terms2">
		<div class="panel-heading"><spring:message code="member.join.terms2.title"/></div>
		<div class="panel-body registeTerms"><spring:message code="member.join.terms2.content"/></div>
		<div class="panel-footer">
			<label><form:checkbox path="terms2"/>&nbsp;<spring:message code="member.join.terms.agree"/></label>
		</div>
	</div>
	<button class="btn btn-default btn_link" data-link="${CONTEXT }/" type="button"><spring:message code="member.join.terms.cancel.btn"/></button>
	<button class="btn btn-success"  type="submit"><spring:message code="member.join.terms.ok.btn"/></button>
	<form:errors path="terms1">
	<script type="text/javascript"><!--
		$(document).ready(function(){
			$(".terms1").removeClass("panel-primary");
			$(".terms1").addClass("panel-danger");
			location.href="#terms1";
		});
	//--></script>
	</form:errors>
	<form:errors path="terms2">
	<script type="text/javascript"><!--
		$(document).ready(function(){
			$(".terms2").removeClass("panel-primary");
			$(".terms2").addClass("panel-danger");
			location.href="#terms2";
		});
	//--></script>
	</form:errors>
</form:form>
